package com.shop.dingdongshoppingapi.controller;

import com.shop.dingdongshoppingapi.service.intf.SmsLogService;
import com.shop.dingdongshoppingapi.vo.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/api/sms/")
@Api("发送短信日志接口")
@CrossOrigin
public class SmsLogController {
	@Resource
	private SmsLogService service;

	@GetMapping("sendLoginCode.do")
	@ApiOperation("发送登录验证码")
	public R sendLoginCode(String phone){
		return service.sendLoginCode(phone);
	}

	@GetMapping("sendFindCode.do")
	@ApiOperation("发送忘记密码验证码")
	public R sendFindCode(String phone){
		return service.sendFindCode(phone);
	}

	@GetMapping("sendRegisterCode.do")
	@ApiOperation("发送注册验证码")
	public R sendRegister(String phone){
		return  service.sendRegisterCode(phone);
	}
}
